home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
doors_1
/
galwar75.zip
/
GALVAR.DOC
< prev
next >
Wrap
Text File
|
1990-07-16
|
17KB
|
470 lines
{ Galactic Warzone variable and contstan declarations }
{ (c) 1989 by Scott M. Baker }
{ }
{ This file contains all data structures used in the Galactic Warzone }
{ data files. It is provided for any users who wish to write their own }
{ utilities for use with Galactic Warzone. }
unit globals;
interface
const
bil: longint = 1500000000;
mil: longint = 2500000;
Galwarname='Galactic Warzone version ';
vernum='7.5';
Galby=' by ';
GalAuthor=' Scott M. Baker ';
numpdevs=15;
armorhits=150;
maxshipdam=150;
NumSDDT=30;
type
team_rec = record
name: string[30];
players: array[1..4] of word;
numplay: byte;
password: string[8];
end;
spy_rec = record
playernum: integer;
info: string[75];
sector: word;
end;
user_rec = record
active: boolean;
turns_left: word;
timeused: byte;
real_name: string[30];
alias: string[30];
last_day: string[8];
holds: word;
eqp: word;
ore: word;
org: word;
fighters: longint;
credits: longint;
credit_account: longint;
stocks: array[1..55] of word;
mines: word;
pulsar: word;
LotteryTickets: word;
onteam: word;
genesis: word;
plasma: word;
timesdied: word;
transport: word;
sector: word;
feds_destroyed: longint;
cabal_destroyed: longint;
devices: array[1..numpdevs] of word;
devicedat: array[1..numpdevs] of word;
devicestat: array[1..numpdevs] of word;
shipstat: array[1..9] of word;
lasthour: byte;
lastmin: byte;
end;
sector_rec = record
Warps: array[1..8] of word;
planet: word;
port: word;
fighters: longint;
fighterp: word;
mines: word;
minep: word;
end;
port_rec = record
class: byte;
name: string[25];
eqp: longint;
org: longint;
ore: longint;
oreprod: longint;
eqpprod: longint;
orgprod: longint;
chg_eqp: word;
chg_ore: word;
chg_org: word;
end;
planet_rec = record
active: boolean;
name: string[30];
fighters: longint;
fighterprod: longint;
ore, org, eqp: longint;
oreprod, orgprod, eqpprod: longint;
mines: longint;
mineprod: longint;
fighterp: word;
cloaks: word;
stuns: word;
end;
outpost_rec = record
active: boolean;
name: string[30];
ore, org, eqp: longint;
credits: longint;
oreprice, orgprice, eqpprice: word;
class: byte;
owner: byte;
end;
starbase_rec = record
active: boolean;
name: string[30];
ore, org, eqp: longint;
credits: longint;
oreprice, orgprice, eqpprice: word;
oreprod, orgprod, eqpprod: longint;
oreinc, orginc, eqpinc: longint;
fighterprod, mineprod: word;
fighters: longint;
mines: word;
class: byte;
owner: byte;
defense: byte;
phaser: longint;
shields: longint;
ambrosia: word;
transport_price: word;
cloaks: word;
stuns: word;
pulsars: word;
kryptons: word;
plasmaEnergy: word;
SelfDestruct: boolean;
ProtectPlanet: boolean;
Cloaking: boolean;
krorder: boolean;
storder: boolean;
bool1,bool2,bool3: boolean;
end;
message_rec = record
lines: array[1..4] of string[80];
dest: word;
orig: word;
timesread: word;
datesent: array[1..3] of word;
end;
stock_rec = record
name: string[30];
price: longint;
trend: integer;
avail: longint;
prices: array[1..4] of longint;
value: longint;
lastvalue: longint;
end;
general_info = record
turns_per_day: word;
days_to_delete: word;
cost_of_fighter: longint;
cost_of_genesis: longint;
cost_of_pulsar: longint;
cost_of_escape: longint;
cost_of_mine: longint;
cost_of_lottery: longint;
cost_of_anticloak: longint;
cost_of_plasma: longint;
cost_of_transport: longint;
cost_of_hold: longint;
cost_of_turn: longint;
cost_of_outpost: longint;
cost_of_starbase: longint;
cabal_days: word;
cargo_holds: longint;
fighters: longint;
credits: longint;
sell_eqp, sell_org, sell_ore: word;
buy_eqp, buy_org, buy_ore: word;
stocks: array[1..55] of stock_rec;
password: string;
fedreport: array[1..50] of word;
fedstrength: array[1..50] of longint;
AllowRemote: boolean;
cabal_attack_earth: byte;
cabal_attack_top_player: byte;
cabal_remain_hq: byte;
cabal_remain_sec: byte;
cabal_num_groups: byte;
cabal_revenge: byte;
wanderer_move: word;
checkwarps: boolean;
Registered_name: string[30];
Registered_data: string[30];
time_today: word;
calls_today: word;
days: word;
time_total: longint;
calls_total: longint;
lastdate: array[1..4] of word;
statson: boolean;
statfile: string;
gambleon: boolean;
triviaenc: boolean;
gamblelimit: longint;
trivia_cost: longint;
trivia_pay: longint;
maxholds: word;
startvers: string[4];
curvers: string[4];
dp: array[1..30] of longint;
maxcloaks: word;
maxstuns: word;
maxmines: word;
cabal_base_sector: word;
cabal_planet_num: word;
FedKillPayoff: real;
FedKillPercent: real;
CabalKillPayoff: real;
CabalKillPercent: real;
tourny: word;
devprice: array[1..100] of longint;
amspecial: word;
cost_of_repair: longint;
end;
playernewsrec = record
user: word;
msg: string[80];
end;
Vault_Rec= Record
Devices: array[1..100] of longint;
credits: longint;
fighters: longint;
mines: longint;
plasmas: longint;
turns: longint;
genesis: longint;
holds: longint;
eqp, ore, org: longint;
charges: real;
transport: longint;
pulsars: longint;
end;
team_array= array[1..30] of team_rec;
team_ptr= ^team_array;
sector_array= array[1..2000] of sector_Rec;
sector_ptr= ^sector_rec;
user_array= array[1..100] of user_Rec;
user_ptr=^user_array;
planet_array = array[1..500] of planet_rec;
planet_ptr=^planet_array;
route_type= array[1..100] of word;
const
maxsec=5000;
numsec: word = 2000;
classes: array[1..16] of string[35] =
('Selling: Equ','Selling: Org','Selling: Ore','Selling: Weapons',
'Selling: All','Selling: None','Not trading','The Galactic Market',
'Federation Operations','Gambling','Selling: Information',
'Offering Transportation','Selling: Devices','Selling: Devices',
'Providing secure storage','Providing safe refuge');
num_of_ports: word =420;
num_orig_ports=420;
oreprodconst=4;
orgprodconst=2;
eqpprodconst=1;
type
devdatatype = (NoData, SecData, TurnData, PersonData, LeftData, CostData, Devtrandata);
activatetype = (Yes, No);
const
plasmaunits=10000;
cloakunits=3000;
stununits=10000;
pulsarunits=16000;
kryptonunits=30000;
numshipstat=6;
shipstatdesc: array[1..numshipstat] of string[35]=
('Warp Engines have', 'Ship Computer has',
'Sensors have', 'Battle-Group Computer has',
'Cargo Bay has', 'Landing Thrusters have');
numlot=14;
maxodds=6500;
lotodds: array[1..numlot] of word=
(60,120,190,240,400,640,930,1240,1390,2050,2450,2730,3390,6570);
lotdesc: array[1..numlot] of string[25]=
('25 fighters', '10 holds', 'an Interstel Link',
'a Genesis Device', 'a Sector Mine', '250 fighters',
'75 holds', 'an Outpost', 'a plasma device',
'an Early Warning Sensor', '1000 Fighters', 'a Mine Deflector',
'250 holds', 'a Krypton Bomb');
lotdesc2: array[1..numlot] of string[25]=
('25 fighters', '10 holds', 'Interstel Link',
'Genesis Device', 'Sector Mine', '250 fighters',
'75 holds', 'Outpost', 'Plasma Device',
'Early Warning Sensor', '1000 Fighters', 'Mine Deflector',
'250 holds', 'Krypton Bomb');
mineshieldhits=5;
numdev=53;
devname: array[1..numdev] of string[40] =
('Starbase Teleporter', {1}
'Early Warning Sensor', {2}
'Ship-to-Ship scanner', {3}
'Planetary scanner', {4}
'Pulsar Tube', {5}
'Anticloak sensor', {6}
'Sensor Beacon', {7}
'Starbase scanner', {8}
'Fusion Cell', {9}
'Mine Deflector', {10}
'Cloaking Device', {11}
'AntiCloaking Device', {12}
'Emergency Warp', {13}
'Krypton Bomb', {14}
'Interstel link', {15}
'Homing Beacon', {16}
'Speed Dock', {17}
'Mine Diffuser', {18}
'Stun Mine', {19}
'Homing Detector', {20}
'Homing Jammer', {21}
'Phaser Bank-1000', {22}
'Phaser Shield-1000', {23}
'Phaser Bank-5000', {24}
'Phaser Shield-5000', {25}
'Renegade Pass', {26}
'Distortion Minimizer', {27}
'Holographic Imager', {28}
'Sb-Aware Autopilot', {29}
'Scout-Autopilot', {30}
'Titanium Armor', {31}
'Regenerative Armor', {32}
'B-Group ACloak + 25%', {33}
'Planetary Autodetect', {34}
'Device Transport', {35}
'Krypton Deflect 10%', {36}
'Mine Deflector (10)', {37}
'Mine Deflector (15)', {38}
'Mine Deflector (20)', {39}
'Mine Deflector (25)', {40}
'Low Armor', {41} { 75 turn }
'Medium Armor', {42} { 250 turn }
'Heavy Armor', {43} { 1000 turn }
'Super Regen Armor', {44} { 500 turn }
'Phaser Shield-10000', {45}
'Phaser Bank-10000', {46}
'Phaser Shield-20000', {47}
'Cloak/Anticloak pack', {48}
'Scanner Pack', {49}
'Invasion Pack', {50}
'Red Cylinder', {51}
'Blue Cylinder', {52}
'Black Box'); {53}
odevprice: array[1..numdev] of longint =
(100000, 75000, 50000, 125000,
350000, 80000, 30000, 175000,
20000, 100000, 18000, 22000,
27000, 250000, 8000, 80000,
22000, 100000, 50000, 40000,
160000, 150000, 175000, 575000,
680000, 60000, 100000, 75000,
50000, 75000, 50000, 300000,
250000, 85000, 25000, 500000,
250000, 500000, 750000, 1000000,
25000, 100000, 300000, 1000000,
1500000, 2500000, 3000000, 180000,
2500000, 7500000, 150000, 500000,
250000);
devdata: array[1..numdev] of devdatatype =
(NoData, NoData, NoData, NoData,
NoData, NoData, SecData, NoData,
TurnData, LeftData, NoData, NoData,
NoData, NoData, NoData, PersonData,
NoData, Leftdata, NoData, NoData,
NoData, NoData, NoData, NoData,
NoData, NoData, NoData, NoData,
CostData, NoData, LeftData, LeftData,
NoData, NoData, DevTranData, NoData,
LeftData, LeftData, LeftData, LeftData,
LeftData, LeftData, LeftData, LeftData,
NoData, NoData, NoData, NoData,
NoData, NoData, NoData, NoData,
NoData);
devact: array[1..numdev] of activatetype =
(Yes, No, Yes, Yes,
Yes, No, Yes, Yes,
Yes, No, No, No,
No, No, Yes, Yes,
No, Yes, No, Yes,
No, No, No, No,
No, No, No, No,
Yes, No, No, No,
No, No, Yes, No,
No, No, No, No,
No, No, No, No,
No, No, No, No,
Yes, No, No, No,
Yes);
type
SecPtrArray=array[1..maxsec] of sector_ptr;
SectorPtrArray=^SecPTrArray;
var
heapstart: longint;
fastarmor: boolean;
fastmines: boolean;
fightertally: longint;
armortally: longint;
holdtally: longint;
codeon2: boolean;
numdeadends: word;
initcabal: word;
bgauto: boolean;
starbasecheck: boolean;
quit_in_starbase: boolean;
user_num: integer;
current_sector: word;
ginfo: general_info;
sectors: SectorPtrArray;
planets: planet_ptr;
users: user_ptr;
teams: team_ptr;
team_file: file of team_rec;
sector_file: file of sector_rec;
port_file: file of port_rec;
planet_file: file of planet_rec;
user_file: file of user_Rec;
outpost_file: file of outpost_rec;
starbase_file: file of starbase_Rec;
playernewsfile: file of playernewsrec;
autopilot: string;
log: text;
exitsave: pointer;
filesopen: boolean;
excludes: array[1..5] of word;
onplanet: boolean;
spyfile: file of spy_rec;
InDeviceUnit: boolean;
alreadydone: array[1..maxsec] of boolean;
trivdone: array[1..2000] of boolean absolute alreadydone;
secdone: array[1..maxsec] of boolean{ absolute alreadydone};
codeon: boolean;
sbcost: word;
autook: boolean;
pref: array[1..10] of boolean;
vaultfile: file of vault_rec;
sddtold: array[1..NumSDDT] of word; {Sector DDTERM old}
SDDT: array[1..numsddt] of word; {Sector DDTERM numbers}
maxsession,waittime: word;
maxturns: word;
implementation
end.